﻿<p:ImageOrganizerWindow x:Class="ImageOrganizer.Contracts.Windows.GoToImageNameWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:p="clr-namespace:ImageOrganizer.Presentation;assembly=ImageOrganizer.Presentation"                        
        Width="300" Height="115"
        Title="{Binding WindowTitle, FallbackValue='Go To Image'}"
        WindowStyle="ToolWindow" ResizeMode="NoResize" ShowInTaskbar="False" 
        mc:Ignorable="d" 
        d:DesignHeight="300" d:DesignWidth="300">
    <p:ImageOrganizerWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/ImageOrganizer.Presentation;component/Resources/Styles/ControlStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </p:ImageOrganizerWindow.Resources>
    <Grid Margin="5pt"
          >
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="5pt" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="3pt" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Label Grid.Row="2" Grid.Column="0" Target="{Binding ElementName=DestinationControl}"
                    Content="_Destination:" 
                    />
            <ComboBox Grid.Row="2" Grid.Column="2" x:Name="DestinationControl"
                      IsEditable="True"
                      DisplayMemberPath="Name"
                      ItemsSource="{Binding AutoCompleteListView}"
                      Text="{Binding FileName, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"
                      IsTextSearchCaseSensitive="False"
                      Validation.ErrorTemplate="{StaticResource ErrorTemplateExtraOffset}"                      
                      />
            <Grid Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="3pt" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
            </Grid>
            <Grid Grid.Row="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="3pt" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
            </Grid>
        </Grid>
        <Grid Grid.Row="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="5pt" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Button Grid.Column="1" 
                    MinWidth="50pt" MinHeight="18pt"
                    Content="_OK"
                    Command="{Binding OKCommand}"
                    IsDefault="True"
                    />
            <Button Grid.Column="3" 
                    MinWidth="50pt" MinHeight="18pt"
                    Content="_Cancel"
                    Command="{Binding CloseCommand}"
                    IsCancel="True"
                    />
        </Grid>
    </Grid>
</p:ImageOrganizerWindow>
